package com.trainoo.redis.controller;

import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

	@Autowired
	private RedisTemplate<String, Object> redisTemplate;

	@RequestMapping("/test")
	public String test() {
		try {
			String a = UUID.randomUUID().toString();
			redisTemplate.opsForValue().set(a, "dddadadfadffffffff}");
		} catch (Exception e) {
			System.out.println(e.getMessage());
		}
		return "a";
	}
}
